<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${context.add_group}-${context.title}</title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">
<script type="text/javascript" src="/group/autosuggest/js/note.js"></script>
</head>
<script language="javascript">
function checkForm1()
{
if(form1.name.value==""||form1.name.value.replace(/(^\s*)|(\s*$)/g, "")=="")
{
alert("<c:out value="${context.msg_name_null}" />");
form1.name.focus();
return false;
}
if(form1.pic.disabled==false&&form1.pic.value=="")
{
alert("<c:out value="${context.msg_image_error}" />");
form1.name.focus();
return false;
}
return true;
}


function ChS1()
{
if(form1.s1.checked){
form1.pic.disabled=false;

}
else
{
form1.pic.disabled=true;
}
}

function changeNav(){

	var opens=document.getElementsByName("open");
	var t=0;
	var navs=document.getElementById("navs");
	for(var i=0;i<opens.length;i++){
if(opens[i].checked &&(opens[i].value=='1'||opens[i].value=='2') ){
navs.style.display="";t=1;
	}
	}
	if(t==0) navs.style.display="none";
}
</script>
<body bottomMargin=0 leftMargin=10 topMargin=0 onload=preloadImages()
	rightMargin=10 marginheight="0">

<c:import url="/group/ui-component/divdialog/divdialog.html" />

<table width="100%" border="0" cellpadding="0" cellspacing="0"
	align=center>
	<%-- //////////////////////banner --%>
	<tr>
		<td><c:import url="/banner.jsp?currentPlatform=0" /></td>
	</tr>

	<tr>
		<td width=100%>
		<table  style="margin-top:10px;">
			<tr>
				<c:if test="${isAdmin }">

					<td width=120 nowrap valign=top><c:import
						url="/group/adminMenu.jsp?currentPlatform=0&addGroup=1" /></td>

				</c:if>
				<td>
				<FORM name="form1" enctype="multipart/form-data"
					onSubmit="return checkForm1();" method=post
					action="/group/addGroup<c:out value='${context.postfix}' />?cmd=addGroup">
				<table cellpadding="5" cellspacing="1" width="750" align=center
					style="border: 1px solid #d4d4d2">

			 

					<tr>
						<td colspan=2 align="center" nowrap><font size="2"
							face="verdana"><b><c:out value='${context.add_group}' /></b></font>
						</td>
					</tr>
					<tr bgcolor="#ffffff" style="height: 30;">
						<td align="left" style="height: 40" nowrap><c:out
							value='${context.text_name}' /></TD>
						<TD align=left><input type=text name="name" size=20
							maxlength=120></TD>
					</TR>
					<tr bgcolor="#ffffff" style="height: 30;">
						<td align="left"><c:out value='${context.text_icon}' /></TD>
						<TD><input name="pic" type=file size="20" maxlength="100"
							disabled> <c:out value='${context.msg_add_now}' /><input
							type=checkbox name=s1 onclick="ChS1()"></TD>
					</TR>
					<tr bgcolor="#ffffff" style="height: 30;">
						<td align="left"><c:out value='${context.text_tag}' /></TD>
						<TD><textarea name=info cols="40" rows="5"  
							class="textarea"></textarea></TD>
					</TR>

											<tr bgcolor="#ffffff">
									<td align="left"><c:out value='${context.text_access}' /></TD>
									<TD align=left nowrap><select name=open>
										<option value="1" >${context.platform1}</option>
										<option value="11" >${context.nav1}</option>
										<option value="2" >${context.platform2}</option>
										<option value="22" >${context.nav2}</option>
										<option value="3" >${context.platform3}</option>
										<option value="4" >${context.platform4}</option>
										<option value="0" >${context.platform0}</option>
									</select> </TD>
								</TR>
					<tr bgcolor="#ffffff" style="height: 30;">
						<td align="left"><c:out value='${context.text_rank}' /></TD>
						<TD align=left><select name=up>
							<option value="10000">no</option>
							<c:set var="up" value="0" />
							<c:forEach begin="1" end="20" step="1">
								<c:set var="up" value="${up+1 }" />
								<option value="<c:out value='${up }' />"
									<c:if test="${up==group.up}" >selected</c:if>><c:out
									value='${up }' /></option>
							</c:forEach>
						</select></TD>
					</TR>


					<tr bgcolor="#ffffff" style="height: 30;">
						<td align="left"><c:out value='${context.en}' /></TD>
						<TD align=left>Yes<input type=radio name="en" value=1 checked>
						&nbsp; No<input type=radio name="en" value=0></TD>
					</TR>

					<tr bgcolor="#ffffff" style="height: 30;">
						<td align="left"><c:out value='${context.local}' /></TD>
						<TD align=left>Yes<input type=radio name="local" value=1 checked>
						&nbsp; No<input type=radio name="local" value=0></TD>
					</TR>

					<tr style="height: 30;">
						<td align="center" colspan=2><input type="submit"
							value="<c:out value='${context.button_ok}' />"
							style="line-height: 18px; align: center;; height: 20px; width: 90px; background: #f6f6f9; border: solid 1px #333333">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
					</tr>

				</table>
				<p></p>
				</FORM>


				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td><c:import url="/footer.jsp" /></td>
	</tr>
<c:if test="${not empty msg}">
		<script>alert('${msg }')</script>
	</c:if>
</table>
</body>
</html>


